package com.crrc.sandameter.common

import android.graphics.Rect
import android.view.View
import androidx.recyclerview.widget.RecyclerView

class RecyclerItemDecoration(private var itemBottom: Int = 0, private var itemTop: Int = 0,
                             private var itemLeft: Int = 0, private var itemRight: Int = 0)
    : RecyclerView.ItemDecoration() {
    override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
        super.getItemOffsets(outRect, view, parent, state)
        outRect.bottom = itemBottom
        outRect.top = itemTop
        outRect.left = itemLeft
        outRect.right = itemRight
    }
}
